{% extends "base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% load dv_filters %}
{% block head_title %}{{ season.desc }} - {% trans "Prochaines sessions" %}{% endblock %}

{% block content %}
    {% include "challenge/season_header.html" with season=season only %}
    <h4>{% blocktrans with monday=week %}Semaine du {{ monday }}{% endblocktrans %}</h4>

    <nav>
        <ul class="pager">
            <li class="previous btn-xs">
                <a href="{% url 'session-list' seasonpk=season.pk year=previous_week.year week=previous_week|weeknumber %}">
                    <span aria-hidden="true">&larr;</span> {{ previous_week }}
                </a>
            </li>
            {% if week|weeknumber != now|weeknumber %}
                <li class="btn-xs"><a href="{% url 'session-list' seasonpk=season.pk year=now.year week=now|weeknumber %}">{% trans "Semaine courante" %}</a>
                </li>
            {% endif %}
            <li class="btn-xs"><a href="{% url 'season-detail' season.pk %}">{% trans "Toutes les sessions" %}</a>
            </li>
            <li class="next btn-xs">
                <a href="{% url 'session-list' seasonpk=season.pk year=next_week.year week=next_week|weeknumber %}">
                    {{ next_week }} <span aria-hidden="true">&rarr;</span>
                </a>
            </li>
        </ul>
    </nav>
    
    <table class="table">
    {% for session in sessions %}
        {% include "challenge/session_item_in_list.html" with session=session season=season user=request.user only %}
    {% endfor %}
    </table>

    {% include "challenge/session_list_links.html" %}
{% endblock %}
